import request from '@/utils/request';

/**
 * @description 查询列表
 */

export const remoteList = data => {
    return request.post('/dict/page/findByJSONParams', data);
};
/**
 * @description 查询所有
 */

export const remoteAllList = data => {
    return request.get('/dict/findAll', data);
};

/**新增 */
export const addOne = data => {
    return request.put('/dict/addOne', data);
};

/**获取 */
export const remoteDict = type => {
    return request.get('/dict/findAll', { data: type });
};

/**更新 */
export const updateOne = data => {
    return request.post('/dict/updateOne', data);
};

/**删除 */
export const deleteInfoByIds = data => {
    return request.delete('/dict/removeByIds', data);
};

/***
 * 字典
 * 城市列表  type=city
 * 高速编码  type=roadcode
 */
export const remoteDictionaryList = params => {
    return request.get(`/sys/dictionary/querydict`, params);
};
